#include<bits/stdc++.h>
using namespace std;
int b[100001];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n,cnt=0,mina,m=1;
    int a[100001];
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
    }
    sort(a+1,a+n+1);
    mina=a[1];
    for(int i=2;i<=n;i++)
    {
        if(a[i]==mina)
        {
            b[i]=1;
        }
        if(a[i]>mina)
        {
            cnt++;
            b[i]=1;
            m++;
            mina=a[m];
        }
    }
    cout<<n-cnt;
    return 0;
}
